Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dhchap & tls key mem leaks #884

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Conversation

martin-gpy
Copy link
Contributor

No description provided.

Valgrind revealed a mem leak when specifying the dhchap host key
through the config JSON file. This was because additional memory
was allocated while assigning the dhchap host key through strdup
calls via both nvme_ctrl_set_dhchap_host_key() and
nvme_get_ctrl_attr(), but only one of them was freed. Fix the same.

Signed-off-by: Martin George <[email protected]>
Valgrind revealed mem leaks when specifying the dhchap ctrl key
through both the config JSON file and the CLI. This was because
additional memory was allocated while assigning the dhchap ctrl
key through strdup calls via both nvme_ctrl_set_dhchap_key() and
nvme_get_ctrl_attr(), but only one of them was freed. Fix the same.

Signed-off-by: Martin George <[email protected]>
Valgrind revealed a mem leak when specifying the tls key through
both the config JSON file and the CLI. This was because memory
allocated through strdup via the nvme_get_ctrl_attr() while
fetching the tls key was not getting freed. Fix it.

Signed-off-by: Martin George <[email protected]>
@martin-gpy martin-gpy changed the title fix dhchap mem leaks fix dhchap & tls key mem leaks Sep 15, 2024
@igaw igaw merged commit 8194960 into linux-nvme:master Sep 16, 2024
15 checks passed
@igaw
Copy link
Collaborator

igaw commented Sep 16, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants